sync: from linuxdeepin/dtkdeclarative#316
Merged
18202781743 merged 1 commit intomasterfrom Oct 23, 2025
Merged
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#543
Reviewer's GuideRefactored ScrollView.qml to synchronize with the upstream linuxdeepin/dtkdeclarative by updating imports, migrating to the QtQuick.Templates ScrollView, and integrating Deepin DTK scrollbars with custom sizing and positioning logic. Class diagram for refactored ScrollView.qml with DTK ScrollBarsclassDiagram
class T.ScrollView {
+implicitWidth
+implicitHeight
}
class D.ScrollBar {
+vertical
+horizontal
+parent
+x
+y
+width
+height
+active
}
T.ScrollView "1" o-- "1" D.ScrollBar : vertical
T.ScrollView "1" o-- "1" D.ScrollBar : horizontal
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
Author
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Double-check the implicitWidth/implicitHeight calculations to ensure edge cases (like varying content or inset sizes) are handled correctly.
- The vertical and horizontal ScrollBar ‘active’ bindings reference each other, creating a circular dependency; consider decoupling those to avoid binding loops.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Double-check the implicitWidth/implicitHeight calculations to ensure edge cases (like varying content or inset sizes) are handled correctly.
- The vertical and horizontal ScrollBar ‘active’ bindings reference each other, creating a circular dependency; consider decoupling those to avoid binding loops.
## Individual Comments
### Comment 1
<location> `src/qml/ScrollView.qml:18-23` </location>
<code_context>
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+
+ D.ScrollBar.vertical: D.ScrollBar {
+ parent: control
+ x: control.mirrored ? 0 : control.width - width
+ y: control.topPadding
+ height: control.availableHeight
+ active: control.D.ScrollBar.horizontal.active
+ }
+
</code_context>
<issue_to_address>
**question (bug_risk):** The vertical scrollbar's 'active' property references the horizontal scrollbar's 'active' state, which may be confusing.
Please verify if the vertical scrollbar should depend on the horizontal scrollbar's 'active' state. If independent control is intended, adjust the logic accordingly.
</issue_to_address>
### Comment 2
<location> `src/qml/ScrollView.qml:26-31` </location>
<code_context>
+ active: control.D.ScrollBar.horizontal.active
+ }
+
+ D.ScrollBar.horizontal: D.ScrollBar {
+ parent: control
+ x: control.leftPadding
+ y: control.height - height
+ width: control.availableWidth
+ active: control.D.ScrollBar.vertical.active
+ }
}
</code_context>
<issue_to_address>
**question (bug_risk):** The horizontal scrollbar's 'active' property references the vertical scrollbar's 'active' state, which may cause circular or unintended activation.
Consider refactoring to avoid circular dependencies between scrollbar 'active' states, or add documentation if synchronization is intended.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Synchronize source files from linuxdeepin/dtkdeclarative.
Source-pull-request: linuxdeepin/dtkdeclarative#543
Summary by Sourcery
Synchronize ScrollView.qml from upstream by migrating to QtQuick.Templates ScrollView, updating module imports, and integrating Deepin scrollbars with implicit sizing.
Enhancements: